package com.joysuch.wwyt.bp.bean.risk;

import cn.zlg.common.springmvc.validate.constraints.NotNull;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.Valid;
import java.time.LocalDate;
import java.util.List;

/**
 * @Author ZhangDong
 * @Date 2020/3/4 11:21
 */
@Data
public class BpTeamBean {

    @ApiModelProperty("主键id-修改时有用")
    private Long id;

    @ApiModelProperty("特种作业集合")
    @NotNull(message = "特种作业不能为空")
    @Valid
    private List<BpTeamSpecialBean> specialBeanList;

    @ApiModelProperty("风险研判集合")
    private List<BpRiskJudgeBean> judgeBeanList;

    @ApiModelProperty("承诺内容")
    private String promiseContent;

    @ApiModelProperty("承诺人")
    private Long promiseUserId;

    @ApiModelProperty("上报日期，格式：yyyy-MM-dd")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "上报日期不能为空")
    private LocalDate reportDate;

    @ApiModelProperty("上报人id")
    @NotNull(message = "上报人不能为空")
    private Long reportUserId;

    @ApiModelProperty("所在班组id")
    @NotNull(message = "所在班组不能为空")
    private Long teamDepartId;

    @ApiModelProperty("上级部门id")
    @NotNull(message = "上级部门不能为空")
    private Long higherDepartId;

    @ApiModelProperty("安全风险研判表集合")
    @Valid
    private List<BpTeamSafeRiskBean> riskBeanList;

}
